package com.example.warehousems.event.event;

import com.example.warehousems.dao.model.Storage;
import org.springframework.context.ApplicationEvent;

public class InOutEvent extends ApplicationEvent {
    Integer id;
    Storage storage;
    String message;

    public InOutEvent(Storage storage, String message, Integer id) {
        super(storage);
        this.storage = storage;
        this.message = message;
        this.id = id;
    }

    public Storage getStorage() {
        return storage;
    }

    public void setStorage(Storage storage) {
        this.storage = storage;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "InOutEvent{" +
                "storage=" + storage +
                ", message='" + message + '\'' +
                '}';
    }
}
